import React from 'react';
import { ScrollView, TextInput, Button, View } from 'react-native';

const MyScreen = () => {
  return (
    <ScrollView 
      keyboardShouldPersistTaps="always" // <- 就是这里
      contentContainerStyle={{ padding: 20 }}
    >
      <TextInput placeholder="输入框 1" style={{ borderWidth: 1, padding: 10, marginBottom: 10 }} />
      <Button 
        title="提交按钮" 
        onPress={() => console.log('按钮被点击了！键盘不收起。')} 
      />
      <TextInput placeholder="输入框 2" style={{ borderWidth: 1, padding: 10, marginBottom: 10 }} />
      <View style={{ height: 800 }} /> {/* 很长的高度，确保可滚动 */}
    </ScrollView>
  );
};

export default MyScreen;